﻿using EVEBatteryCheck.ViewModels;
using GalaSoft.MvvmLight;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;

namespace EVEBatteryCheck.ViewModels {
    public class MainViewModel : ViewModelBase {

        private string _LotId = "批次";
        public string LotId { get => _LotId; set => Set("LotId", ref _LotId, value); }



        private ObservableCollection<LogModel> _ListLog_AtScan = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListLog_AtScan { get { return _ListLog_AtScan; } set { Set("ListLog_AtScan", ref _ListLog_AtScan, value); } }

        private ObservableCollection<LogModel> _ListWarning_AtScan = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListWarning_AtScan { get { return _ListWarning_AtScan; } set { Set("ListWarning_AtScan", ref _ListWarning_AtScan, value); } }


        private ObservableCollection<LogModel> _ListLog_AtCCD = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListLog_AtCCD { get { return _ListLog_AtCCD; } set { Set("ListLog_AtCCD", ref _ListLog_AtCCD, value); } }

        private ObservableCollection<LogModel> _ListLog_AtRobot = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListLog_AtRobot { get { return _ListLog_AtRobot; } set { Set("ListLog_AtRobot", ref _ListLog_AtRobot, value); } }

        private ObservableCollection<LogModel> _ListLog_AtPreCharge = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListLog_AtPreCharge { get { return _ListLog_AtPreCharge; } set { Set("ListLog_AtPreCharge", ref _ListLog_AtPreCharge, value); } }

        private ObservableCollection<LogModel> _ListLog_AtPreCharge2 = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListLog_AtPreCharge2 { get { return _ListLog_AtPreCharge2; } set { Set("ListLog_AtPreCharge2", ref _ListLog_AtPreCharge2, value); } }




        private ObservableCollection<LogModel> _ListErrorLog_AtScan = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListErrorLog_AtScan { get { return _ListErrorLog_AtScan; } set { Set("ListErrorLog_AtScan", ref _ListErrorLog_AtScan, value); } }

        private ObservableCollection<LogModel> _ListErrorLog_AtCCD = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListErrorLog_AtCCD { get { return _ListErrorLog_AtCCD; } set { Set("ListErrorLog_AtCCD", ref _ListErrorLog_AtCCD, value); } }

        private ObservableCollection<LogModel> _ListErrorLog_AtRobot = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListErrorLog_AtRobot { get { return _ListErrorLog_AtRobot; } set { Set("ListErrorLog_AtRobot", ref _ListErrorLog_AtRobot, value); } }

        private ObservableCollection<LogModel> _ListErrorLog_AtPreCharge = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListErrorLog_AtPreCharge { get { return _ListErrorLog_AtPreCharge; } set { Set("ListErrorLog_AtPreCharge", ref _ListErrorLog_AtPreCharge, value); } }

        private ObservableCollection<LogModel> _ListErrorLog_AtPreCharge2 = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListErrorLog_AtPreCharge2 { get { return _ListErrorLog_AtPreCharge2; } set { Set("ListErrorLog_AtPreCharge2", ref _ListErrorLog_AtPreCharge2, value); } }

        private ObservableCollection<LogModel> _ListLog_AtChargeEnd1 = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListLog_AtChargeEnd1 { get { return _ListLog_AtChargeEnd1; } set { Set("ListLog_AtChargeEnd1", ref _ListLog_AtChargeEnd1, value); } }

        private ObservableCollection<LogModel> _ListLog_AtChargeEnd2 = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListLog_AtChargeEnd2 { get { return _ListLog_AtChargeEnd2; } set { Set("ListLog_AtChargeEnd2", ref _ListLog_AtChargeEnd2, value); } }


        private ObservableCollection<LogModel> _ListErrorLog_AtChargeEnd1 = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListErrorLog_AtChargeEnd1 { get { return _ListErrorLog_AtChargeEnd1; } set { Set("ListErrorLog_AtChargeEnd1", ref _ListErrorLog_AtChargeEnd1, value); } }

        private ObservableCollection<LogModel> _ListErrorLog_AtChargeEnd2 = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListErrorLog_AtChargeEnd2 { get { return _ListErrorLog_AtChargeEnd2; } set { Set("ListErrorLog_AtChargeEnd2", ref _ListErrorLog_AtChargeEnd2, value); } }





        private ObservableCollection<LogModel> _ListLog = new ObservableCollection<LogModel>();
        public ObservableCollection<LogModel> ListLog { get { return _ListLog; } set { Set("ListLog", ref _ListLog, value); } }


        private bool _IsErrorOnScan;
        public bool IsErrorOnScan { get => _IsErrorOnScan; set => Set("IsErrorOnScan", ref _IsErrorOnScan, value); }

        private bool _IsWarningOnScan;
        public bool IsWarningOnScan { get => _IsWarningOnScan; set => Set("IsWarningOnScan", ref _IsWarningOnScan, value); }



        private bool _IsErrorOnCCD;
        public bool IsErrorOnCCD { get => _IsErrorOnCCD; set => Set("IsErrorOnCCD", ref _IsErrorOnCCD, value); }

        private bool _IsWarningOnCCD;
        public bool IsWarningOnCCD { get => _IsWarningOnCCD; set => Set("IsWarningOnCCD", ref _IsWarningOnCCD, value); }



        private bool _IsErrorOnRobot;
        public bool IsErrorOnRobot { get => _IsErrorOnRobot; set => Set("IsErrorOnRobot", ref _IsErrorOnRobot, value); }

        private bool _IsWarningOnRobot;
        public bool IsWarningOnRobot { get => _IsWarningOnRobot; set => Set("IsWarningOnRobot", ref _IsWarningOnRobot, value); }


        private bool _IsErrorOnPreCharge;
        public bool IsErrorOnPreCharge { get => _IsErrorOnPreCharge; set => Set("IsErrorOnPreCharge", ref _IsErrorOnPreCharge, value); }

        private bool _IsWarningOnPreCharge;
        public bool IsWarningOnPreCharge { get => _IsWarningOnPreCharge; set => Set("IsWarningOnPreCharge", ref _IsWarningOnPreCharge, value); }


        private bool _IsErrorOnPreCharge2;
        public bool IsErrorOnPreCharge2 { get => _IsErrorOnPreCharge2; set => Set("IsErrorOnPreCharge2", ref _IsErrorOnPreCharge2, value); }

        private bool _IsWarningOnPreCharge2;
        public bool IsWarningOnPreCharge2 { get => _IsWarningOnPreCharge2; set => Set("IsWarningOnPreCharge2", ref _IsWarningOnPreCharge2, value); }



        private bool _IsErrorOnEndCharge;
        public bool IsErrorOnEndCharge { get => _IsErrorOnEndCharge; set => Set("IsErrorOnEndCharge", ref _IsErrorOnEndCharge, value); }






        private bool _IsErrorOnEndCharge2;
        public bool IsErrorOnEndCharge2 { get => _IsErrorOnEndCharge2; set => Set("IsErrorOnEndCharge2", ref _IsErrorOnEndCharge2, value); }



        private bool _NGOut;
        public bool NGOut { get => _NGOut; set => Set("NGOut", ref _NGOut, value); }

        private bool _NGOut2;
        public bool NGOut2 { get => _NGOut2; set => Set("NGOut2", ref _NGOut2, value); }



    }

    public class LogModel : ViewModelBase {
        private string _Msg;
        public string Msg { get => _Msg; set => Set("Msg", ref _Msg, value); }

        private Brush _Brush;
        public Brush Brush { get => _Brush; set => Set("Brush", ref _Brush, value); }

        private string _Time;
        public string Time { get => _Time; set => Set("Time", ref _Time, value); }



    }
}
